home *** CD-ROM | disk | FTP | other *** search
- Path: goanna.cs.rmit.EDU.AU!not-for-mail
- From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 22 Feb 1996 15:47:42 +1100
- Organization: Comp Sci, RMIT, Melbourne, Australia
- Message-ID: <4ggshe$7bk@goanna.cs.rmit.EDU.AU>
- References: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com> <312515DF.7D3B@cmlj.demon.co.uk> <4gad29$ddp@druid.borland.com>
- NNTP-Posting-Host: goanna.cs.rmit.edu.au
- X-Newsreader: NN version 6.5.0 #0 (NOV)
-
- In article <312515DF.7D3B@cmlj.demon.co.uk>, chris@cmlj.demon.co.uk says...
- >With regards to maintenance, there's many people out there who consider
- >C/C++ a Write only language.
-
- pete@borland.com (Pete Becker) writes:
- >How many of the people who say this have actually used C++ enough to
- >understand it?
-
- (1) Almost any programming language is going to be called "write-only" by
- people who have not worked with it for a bit.
-
- (2) "Notation as a tool of thought": there are some really brilliant notations
- which can actually help you think more clearly about some things. APL is
- a case in point: I have found it a very powerful notation for a small
- class of problems; within that class trying to keep it simple often led
- me to a specification with fewer "rough edges". The notation could be
- abused; it often was abused; and it was limited. Mathematical notation
- in general can be concise, verbose, revealing, hopelessly obscure. You
- have to combine even the best notation with a sense of elegance and some
- consideration for your readers.
-
- (3) Precisely because they are popular, C and C++ are used by a lot of
- programmers who shouldn't be allowed near a keyboard without a helmet
- and padded knees. There is a lot of extremely bad C and C++ code.
- It is easy for a language to get a bad reputation when nearly every
- book you see has dreadful code in it.
-
- (4) C++ in particular has been changing very rapidly. It seems as if every
- time I turn around there is a new keyword. I was looking at some code
- fragments today in a book; they were full of things like
- void HelpIndex () (RTMessage) = [CM_FIRST+CM_HelpIndex];
- I've used three C++ compilers, read every book with "Stroustrup" on it,
- and keep on browsing through the draft standard, and haven't the foggiest
- notion what this is supposed to do. If a few keywords had been used
- instead of punctuation marks, I might have been able to figure it out...
- Conversely, there's a program I was given in 1988, written in C++, that
- I haven't been able to compile for years, so today's _compilers_ think
- it isn't "readable" (sad smiley).
-
- (5) Let's be clear about the goals and accomplishments of C++.
- It was designed to make it easy for skilled programmers to WRITE large
- object-oriented programs. It is obvious to any fair observer that it
- has accomplished these goals. It was _not_ designed with readability,
- formal verification, or protecting idiots from themselves in mind.
-
- (6) In the world of software engineering, easy to read is better than easy
- to write, even Homer nods to protecting idiots like me from ourselves
- is thought to be important, and some level of verifiability is thought
- to be a Good Thing. (Come to think of it, the way Alphard 'form's
- were annotated should carry over nicely to C++ classes, so how come
- such annotations are so rare in the code I've seen?)
-
- (7) Intentionally left blank.
- --
- Election time; but how to get Labor _out_ without letting Liberal _in_?
- Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.
-